import java.util.HashMap;
import java.util.Map;

public class Teacher {
    private String name;
    private Map<String, Integer> students = new HashMap<>();

    public Teacher(String name, Map<String, Integer> students){
        this.name = name;
        this.students = students;
    }

    public void addStudent(Student student){
        this.students.put(student.getName(), student.getAge());
    }

    public void printStudents(){
        System.out.println(students);
    }
}
